﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectQuestion.aspx.cs" Inherits="sysadmin_QuestionManager_SelectQuestion" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>选择试题</title>
    <link href="../../css/1/css/css.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
        function ShowNo()                        //隐藏两个层
        {
            document.getElementById("doing").style.display="none";
            document.getElementById("divLogin").style.display="none";
        }
        function $(id)         
        {
            return (document.getElementById) ? document.getElementById(id) : document.all[id] ;
        }
        function showFloat()                    //根据屏幕的大小显示两个层
        {
            var range = getRange();
            $('doing').style.width = range.width + "px";
            $('doing').style.height = range.height + "px";
            $('doing').style.display = "block";
            document.getElementById("divLogin").style.display="";
        }
        function getRange()                      //得到屏幕的大小
        {
              var top     = document.body.scrollTop;
              var left    = document.body.scrollLeft;
              var height  = document.body.clientHeight;
              var width   = document.body.clientWidth;

              if (top==0 && left==0 && height==0 && width==0) 
              {
                top     = document.documentElement.scrollTop;
                left    = document.documentElement.scrollLeft;
                height  = document.documentElement.clientHeight;
                width   = document.documentElement.clientWidth;
              }
              return  {top:top  ,left:left ,height:height ,width:width } ;
        } 

    </script>

</head>
<body class="bodymain">
    <form id="form1" runat="server">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tree-titbg_right">
            <tr>
                <td class="tree-titbg_left">
                    <asp:Label ID="lab_TitleInfo" runat="server" Text="添加试卷(第二步)"></asp:Label></td>
            </tr>
        </table>
       
        <br />
        <table border="0" cellpadding="0" cellspacing="0" class="btnbg" width="100%">
            <tr>
                <td>
                    <asp:CheckBox ID="chbox_all" runat="server" AutoPostBack="True" OnCheckedChanged="chbox_all_CheckedChanged"
                        Text="全选/取消" ValidationGroup="ck" />
                    <asp:CheckBox ID="chbox_Unselect" runat="server" AutoPostBack="True" OnCheckedChanged="chbox_Unselect_CheckedChanged"
                        Text="反选" ValidationGroup="ck" />
                    <asp:Button ID="btnSave" runat="server" Text="保存并继续选题" CssClass="inputBotton2" OnClick="btnSave_Click" />
                    <asp:Button ID="btnPreview" runat="server" CssClass="inputBotton2" Text="预览选中试题"
                        OnClick="btnPreview_Click" Visible="False" />
                    <asp:Button ID="btnUp" runat="server" CssClass="inputBotton2" Text="返回上一步" OnClick="btnUp_Click" />
                    <asp:Button ID="btnNext" runat="server" CssClass="inputBotton2" Text="进入下一步" OnClick="btnNext_Click" /></td>
                <td>
                    <asp:TextBox ID="txt_SearchKey" runat="server"></asp:TextBox>
                    <asp:Button ID="btn_SortSearch" runat="server" Text="搜索" CssClass="inputBotton2"
                        OnClick="btn_SortSearch_Click" />&nbsp; <a href="javascript:void(0)" onclick="showFloat()">
                           <%=GetLanageValueByKey("btn_ManagerQuestion_highSearch", PowerCreator.LMS.Language.LanagetItemType.Page) %></a>&nbsp;
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvQuestionList" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvQuestionList_RowDataBound"
            GridLines="None" BorderWidth="0px" CssClass="mainList" 
            onrowcreated="gvQuestionList_RowCreated">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkIsSelected" runat="server" />
                        <asp:Label ID="lblQuestionID" runat="server" Visible="False" Text='<%# DataBinder.Eval(Container.DataItem, "ID") %>'></asp:Label>
                        <asp:Label ID="labQuestionContent" Visible="False" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "QuestionContent") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="试题内容">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text=""><%# DataBinder.Eval(Container.DataItem, "QuestionContent_Clear")%></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="QuestionTypeName" HeaderText="题目类型" />
                <asp:BoundField DataField="QuestionDiffculty" HeaderText="试题难度" />
                <asp:BoundField DataField="QuestionDefaultScore" HeaderText="试题分数" />
            </Columns>
        </asp:GridView>
        &nbsp;
        <table border="0" cellpadding="0" cellspacing="0" class="tableList2" width="100%">
            <tr>
                <td>
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Center" OnPageChanged="AspNetPager1_PageChanged"
                        ShowCustomInfoSection="Left" Width="100%" meta:resourceKey="AspNetPager1" Style="font-size: 14px"
                        InputBoxStyle="width:19px" CustomInfoHTML="当前页  <font color='red'><b>%CurrentPageIndex%</b></font> 总页数  %PageCount%  当前条数 %StartRecordIndex%-%EndRecordIndex%"
                        FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
        <div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3;
            background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute;
            left: 0; top: 0; display: none; overflow: hidden;">
        </div>
        <div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px;
            width: 780px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%;
            margin: -200px 0 0 -400px;">
            <div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;">
             <table border="0" cellpadding="0" cellspacing="0" class="tableList2" width="100%">
            <tr>
                <th>
                    <asp:Label ID="lab_QuestionContent" runat="server" Text="试题内容"></asp:Label></th>
                <td>
                    <asp:TextBox ID="txtQuestionContent" runat="server"></asp:TextBox></td>
                <th>
                    <asp:Label ID="lab_Course" runat="server" Text="所属课程"></asp:Label></th>
                <td>
                    <asp:TextBox ID="txtCourseName" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lab_QuestonType" runat="server" Text="题目类型"></asp:Label></th>
                <td>
                    <asp:DropDownList ID="ddlQuestionTypeList" runat="server" AppendDataBoundItems="True">
                        <asp:ListItem Selected="True" Value="null">请选择</asp:ListItem>
                    </asp:DropDownList></td>
                <th>
                    <asp:Label ID="lab_QeustionDiffculty" runat="server" Text="试题难度"></asp:Label></th>
                <td>
                    <asp:DropDownList ID="ddlDiffculty" runat="server" AppendDataBoundItems="True">
                        <asp:ListItem Selected="True" Value="null">请选择</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td class="tree-bottom-bg" colspan="4">
                    <asp:Button ID="btnSearch" runat="server" CssClass="inputBotton2" Text=" 搜 索 " OnClick="btnSearch_Click" />
                    &nbsp;&nbsp;&nbsp;
                    <input id="btn_colse" class="inputBotton2" onclick="ShowNo();" type="button" value='<%=GetLanageValueByKey("btn_ManagerQuestion_Close", PowerCreator.LMS.Language.LanagetItemType.Page) %>' /></td>
            </tr>
        </table>
            </div>
        </div>
    </form>
</body>
</html>
